import { createApp } from 'vue'
import App from '@/App.vue'
// 引入路由
import router from "@/router/index"
// 引入和创建pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
// 引入element-plus  组件 国际化 icon 
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
// 挂载路由
app.use(router)
// pinia挂载
app.use(pinia)
// 挂载elementplus
app.use(ElementPlus, {
    locale: zhCn,
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app')
